﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TagCore
{
    public static class FilePattern
    {
        private static List<string> patterns;

        static FilePattern()
        {
            patterns = new List<string>();
            patterns.Add("A - T");
            patterns.Add("N - T");
        }

        public static string[] GetPatterns()
        {
            return patterns.ToArray();
        }

        public static string GetFileName(string pattern, IMusicData md)
        {
            string result = pattern.Replace("A", "{0}");
            result = result.Replace("T", "{1}");
            result = result.Replace("N", "{2}");

            result = string.Format(result, new object[] { md.Artists[0], md.Title, md.Year.ToString()});

            return result;
        }
    }
}
